package client.controleur;

import javax.swing.ImageIcon;
import javax.swing.JTabbedPane;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;

import client.vue.Jeu;

public class JeuChangeListener implements ChangeListener {

	private Jeu jeu;

	public JeuChangeListener(Jeu jeu) {
		this.jeu = jeu;
	}

	@Override
	public void stateChanged(ChangeEvent changeEvent) {

		JTabbedPane sourceTabbedPane = (JTabbedPane) changeEvent.getSource();
		int index = sourceTabbedPane.getSelectedIndex();
		jeu.getTabbedPane().setIconAt(index, new ImageIcon());

	}

}
